/*
 * Copyright 2016 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.outputs-panel {
  position: relative;
  flex: 1;
  display: flex;
  background-color: material-color('grey', '300');

  &[data-theme="dark"] {
    background-color: material-color('grey', '400');
  }
}

.outputs-items {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  padding: 48px;
}

#grid-toggle-container {
  position: absolute;
  left: 32px;
  top: 32px;
}

#download-zip-button {
  position: absolute;
  top: 32px;
  right: 32px;
  z-index: 1;
}

.outputs-main {
  flex: 0 0 auto;
  margin: auto 0;
}

.outputs-additional-toggle {
  flex: 0 0 auto;
  cursor: pointer;
  text-align: center;
  font-size: 13px;
  line-height: 20px;
  color: $colorBlackSecondary;
  font-weight: 500;
  margin-top: 32px;
  text-transform: uppercase;
  letter-spacing: .5px;
  display: flex;
  flex-direction: row;
  align-items: center;

  &::after {
    @include material-icons;
    content: 'expand_more';
    padding-left: 2px;
  }

  &:hover,
  &:focus {
    color: $colorBlackPrimary;
  }
}

.outputs-panel.is-showing-all {
  .outputs-additional {
    display: flex;
  }

  .outputs-additional-toggle::after {
    content: 'expand_less';
  }
}

.outputs-additional {
  flex: 0 0 auto;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 32px;
}

.outputs-image-group {
  display: inline-block;
  background-color: #fff;
  padding: 8px 10px;
  margin-right: 12px;
  margin-bottom: 12px;
  border-radius: 2px;
}

.outputs-label {
  font-family: 'Roboto Mono', monospace;
}

.outputs-image-block {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
  line-height: 16px;
  color: $colorBlackTertiary;
  font-weight: 500;
  text-align: center;
  margin: 4px;
}

.outputs-image-container {
  margin-top: 4px;
  position: relative;
  display: flex;
}

.outputs-image-overlay {
  display: none;
}

.show-grid .outputs-image-overlay {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;

  svg {
    width: 100%;
    height: 100%;
    stroke-width: 1px;
    stroke: $thinBorderColor;
  }
}

.outputs-image {
  box-shadow: 0 0 0 1px $thinBorderColor;
  border-radius: 2px;
  display: inline-block;
  position: relative;
}

.outputs-image-group.dark {
  background-color: rgba(0,0,0,0.9);
}

.outputs-image-group.dark .label {
  color: #ccc;
}

.outputs-image-group.dark .outputs-image {
  border: 1px solid #555;
}

.outputs-image-group.dark.half {
  background-color: rgba(0,0,0,0.5);
}
